cmake_minimum_required(VERSION 3.0.2)
project(customize_topic)

find_package(catkin REQUIRED COMPONENTS
  message_generation
  roscpp
)

add_message_files(FILES Person.msg)
generate_messages(DEPENDENCIES  std_msgs)

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES customize_topic
  CATKIN_DEPENDS message_generation roscpp
#  DEPENDS system_lib
)

include_directories(
# include
  ${catkin_INCLUDE_DIRS}
)

add_executable(${PROJECT_NAME}_pub_node src/pub_topic.cpp)
add_dependencies(${PROJECT_NAME}_pub_node ${PROJECT_NAME}_gencpp)
target_link_libraries(${PROJECT_NAME}_pub_node ${catkin_LIBRARIES})

add_executable(${PROJECT_NAME}_sub_node src/sub_topic.cpp)
add_dependencies(${PROJECT_NAME}_sub_node ${PROJECT_NAME}_gencpp)
target_link_libraries(${PROJECT_NAME}_sub_node ${catkin_LIBRARIES})

